package com.sdry.web.controller.task;

import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimerTask;

import javax.annotation.Resource;
import javax.servlet.ServletContextEvent;

import org.springframework.web.context.support.WebApplicationContextUtils;

import com.sdry.service.impl.llm.UserReportServiceImp;
import com.sdry.service.llm.UserReportService;
import com.sdry.service.lqy.WeeklyProductionReportService;
import com.sdry.service.report.OutputMaterielReportDataUtilsService;

public class MsgTask1 extends TimerTask {
	
	@Resource
	private UserReportService userReportService;
	@Resource
	private WeeklyProductionReportService weeklyproductionreport;
	@Resource 
	OutputMaterielReportDataUtilsService OutputMaterielReportDataUtilsService;
	@Resource 
	OutputMaterielReportDataUtilsService outputMaterielReportDataUtilsService;
	
	public MsgTask1() {
	}

	public void run() {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM");//设置日期格式
		String dateMonth = df.format(new Date());
//		try {
//			//更新人员报表
//			userReportService.renewalUserReport(dateMonth);
//			//更新综合日报表
//			weeklyproductionreport.updatacomprehening(dateMonth);
//		} catch (ParseException e) {
//			e.printStackTrace();
//		}
	}
}
